import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
import { ConfigService } from "@nestjs/config";

@Entity({
  name: "contract"
})
export class ContractEntity {

  constructor(
    private readonly configService: ConfigService
  ) {
  }

  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  title: string;

  @Column()
  contract_file_name: string;

  @Column()
  contract_url: string;

  @Column()
  preview_url: string;

  @Column()
  sending_num: number;

  @Column()
  recycling_num: number;

  @Column()
  type: number;

  @Column()
  status: number;

  @Column()
  initiator: number;

  @Column({ type: 'int', unsigned: true, default: 0, comment: '合同当前最大序号' })
  max_index: number;

  @Column()
  sign_link: string;

  @Column()
  created_at: number;

  @Column()
  sign_qr_code: string;

}
